<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="moduleEdit" />
	<link href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css" rel="stylesheet" type="text/css">
	<script type="text/javascript">
	$(document).ready(function() {
		
		 $("#intAssterminateForm").validate({
			submitHandler: function(form){
				Oosp_Loading('正在提交，请稍等...');
				form.submit();
			},
			errorContainer: "#messageBox",
			errorPlacement: function(error, element) {
				$("#messageBox").text("输入有误，请先更正。");
				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
					error.appendTo(element.parent().parent());
				} else {
					error.insertAfter(element);
				}
			}
		}); 
		$("#saveAssociated").click(function (){
			$("#intAssterminateForm").submit();
		});
		
		$("#submit_wokFlow").click(function(){
			Oosp_Loading('正在提交，请稍等...');
			$('#intAdvertdiscardForm').attr('action','${contextPath}/biz/intent/intAdvertdiscard/submit?navId=${navId}');
			$("#intAdvertdiscardForm").submit();
		});
	});
	
	</script>
	
</head>
<body>
	<div class="Report_f">
		<div class="Report_f_1">
			<form id="intAdvertdiscardForm" action="${contextPath}/biz/intent/intAdvertdiscard/save?navId=${navId}" method="post" class="form-horizontal">
			<div class="Report_f_title_1">
				<strong>广告合同作废意向新增</strong>
			</div>
			<ul class="nav nav-tabs Report_f_title_2" id="myTab">
				  <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
				   <li><a href="#workflow" data-toggle="tab">流程审批 </a></li> 
			  	  <li><a href="#diagram" data-toggle="tab">流程图</a></li>
			 </ul> 
			<input type="hidden" id="contractId" name="contractId" value="${intAssdiscard.contractId}" >
			<input type="hidden" id="id" name="id" value="${intAssdiscard.id}" >
			<input type="hidden" id="intentNo" name="intentNo" value="${intAssdiscard.intentNo}" >
			<input type="hidden" id="status" name="status" value="${intAssdiscard.status}" >
			<div class="tab-content Report_f_title_3 ">
				<div class="tab-pane active" id="home">
					<div class="Report_f_title_4">
						<div class="f_2">
							<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">原合同号:</label>
										<div class="col-sm-6 f_6">
											<input id="contractNo" name="contractNo"
												value="${associatedContract.contractNo}" maxlength="200"
												readonly="readonly" class="f_5  readonly" />
										</div>
							</div>
							<div class="form-group col-sm-6">
								<label for="inputtext3" class="col-sm-3 control-label f_4">原合同名称:</label>
								<div class="col-sm-6 f_6">
									<input id="subject" name="subject" value="${associatedContract.subject}" maxlength="200" placeholder="联营合同" readonly class="f_5" />
								</div>
							</div>
						</div>
						<div class="f_3">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">管理区域:</label>
										<input type="hidden" id="areaId" name="areaId" value="${intAssdiscard.areaId}">
										<div class="col-sm-6 f_6">
												<input type="text" class="f_5"value="${intAssdiscard.area}" id="area" name="area"readonly="readonly"> 
										</div>
									</div>
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4">签约门店:</label>
											<input type="hidden" id="storeId" name="storeId" value="${intAssdiscard.storeId}">
											<div class="col-sm-6 f_6">
												<input type="text" class="f_5"
													value="${intAssdiscard.store}" id="store" name="store" 
													readonly="readonly"> 
											</div>
										</div>
									</div>
						</div>
						<div class="f_2">
									<div class="form-group col-sm-6">
										<label for="floor" class="col-sm-3 control-label f_4">签约楼层:</label>
										<input type="hidden" id="floorId" name="floorId" value="${intAssdiscard.floorId}">
										<div class="col-sm-6 f_6">
											<input type="text" class="f_5"value="${intAssdiscard.floor}" id="floor" name="floor"readonly="readonly">
										</div>
									</div>

									<div class="form-group col-sm-6">
									<input type="hidden" id="supplierId" name="supplierId" value="${intAssdiscard.supplierId}">
										<label for="inputtext3" class="col-sm-3 control-label f_4">供应商名称:</label>
										<div class="col-sm-6 f_6">
										<input type="hidden" class="f_5"
													value="${intAssdiscard.supplierNo}" id="supplierNo" name="supplierNo" 
													readonly="readonly"> 
												<input type="text" class="f_5"value="${intAssdiscard.supplierName}" id="supplierName" name="supplierName"readonly="readonly"> 
										</div>
									</div>
							</div>
						<div class="f_2">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">合同是否成立:</label>
										<div class="col-sm-6 f_6">
												<ossp:radio dictType="YESORNO" id="isContractActive" defaultChecked="1" value="${intAssdiscard.isContractActive}" name="isContractActive"></ossp:radio>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4">是否进场营业:</label>
											<div class="col-sm-6 f_6">
												<ossp:radio dictType="YESORNO" id="isRunning" defaultChecked="1" value="${intAssdiscard.isRunning}" name="isRunning"></ossp:radio>
											</div>
										</div>
									</div>
						</div>
						<div class="f_3">
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">是否欠款:</label>
										<div class="col-sm-6 f_6">
												<ossp:radio dictType="YESORNO" id="isDebt" defaultChecked="1" value="${intAssdiscard.isDebt}" name="isDebt"></ossp:radio>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4">有无法律纠纷:</label>
											<div class="col-sm-6 f_6">
												<ossp:radio dictType="YESORNO" id="hasLawRisk" value="${intAssdiscard.hasLawRisk}" name="hasLawRisk"></ossp:radio>
											</div>
										</div>
									</div>
								</div>
								
						<div class="f_2">
									<div class="form-group col-sm-6">
											<label for="inputtext3" class="col-sm-3 control-label f_4">作废原因声明:</label>
											<div class="col-sm-5 f_7">
												<textarea rows="8" cols="112" id="discardReason" name="discardReason" class="form">${intAssdiscard.discardReason}</textarea>
											</div>
									</div>
									
						</div>
						<div class="f_3">
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4">提报人:</label>
											<div class="col-sm-6 f_6">
												<input type="text" class="f_5" id="createBy" value="${intAssdiscard.createBy}" readonly="readonly"> 
												<input type="hidden" class="f_5" id="createById" name="createBy" value="${intAssdiscard.createById}" readonly="readonly"> 
											</div>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">提报时间:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5"  size="10" id="createTime1" name="createTime1" value="<fmt:formatDate value="${intAssdiscard.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly  type="text" /> 
												<input type="hidden" id="createTime" name="createTime" value="<fmt:formatDate value="${intAssdiscard.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" />
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
											<span id="createTime" class=" help-inline"
												style="color: red;"></span>
										</div>
									</div>
									
						</div>
						
						<div class="f_2">
									<div class="form-group col-sm-6">
										<div>
											<label for="inputtext3" class="col-sm-3 control-label f_4">最后修改人:</label>
											<div class="col-sm-6 f_6">
												<input type="text" class="f_5" id="updateBy" name="updateBy" value="${intAssdiscard.updateBy}" readonly="readonly"> 
											</div>
										</div>
									</div>
									<div class="form-group col-sm-6">
										<label for="inputtext3" class="col-sm-3 control-label f_4">最后修改时间:</label>
										<div class="col-sm-6 f_6">
											<div class="input-group date  o-a-form-datetime " data-date="" data-date-format="yyyy-mm-dd">
												<input class="f_5"  size="10" id="updateTime1" name="updateTime1" value="<fmt:formatDate value="${intAssdiscard.updateTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>" readonly  type="text" /> 
												<input type="hidden" id="updateTime" name="updateTime"  value="<fmt:formatDate value="${intAssdiscard.updateTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
												<span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                           					 <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
											</div>
											<span id="endDateMessage" class=" help-inline"
												style="color: red;"></span>
										</div>
									</div>
									
							</div>
					</div>
				</div>
					<!-- --------------------------------------- -->
			<div class="tab-pane" id="workflow"> 
								  <c:import url="/WEB-INF/views/bpm/workflow/workFlowInfo_edit.jsp">
									<c:param name="formName" value="com.maoye.ossp.biz.intent.entity.IntAdvertdiscard" />
									<c:param name="flowKey" value="IntAdvertdiscard" />
									<c:param name="businessId" value="${intAssdiscard.id}"/>
									<c:param name="method" value="${method}"/>
									<c:param name="isStart" value="${isStart}"/>
								  </c:import> 			
							</div>
							<div class="tab-pane" id="diagram" style="overflow-x:auto;">
								<iframe id="diagram_iframe" scrolling="no" frameborder=0 width="100%">
								</iframe>
							</div>
						 <div class="tab-pane" id="contract_hist">
						 	<iframe id="versionFrame"   name="versionFrame"  
															scrolling="no" frameborder="no" width="100%"></iframe>
						 </div>	
				 
			 <!-- --------------------------------------- -->
			</div>
		
		<div class="o-l-action">
					<a class="btn btn-info btn_3 btn_right" role="button" href="${contextPath}/biz/intent/intAdvertdiscard/list?navId=${navId}">返回</a>
					<c:if test="${intAssdiscard.status == '00'}">
						<button id="save" class="btn btn-info btn_3 btn_right" type="submit">保 存</button>
					</c:if>
					<button id="submit_wokFlow" class="btn btn-info btn_3 btn_right" type="button">提交</button>
				</div>
		</form>
		</div>
	</div>

<script type="text/javascript">
	$('.o-a-form-datetime').datetimepicker({
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
		autoclose: 1,
		todayHighlight: 1,
		startView: 2,
		minView: 2,
		forceParse: 0,
		format: 'yyyy-mm-dd'
    });

</script>
</body>
</html>